<?php

namespace App\Library\Requests\Address;

use App\Library\Requests\Base\BaseDTORequest;

class AddressAddRequest extends BaseDTORequest
{
    public function rules(): array
    {
        return [
            'contacts' => 'required|string|max:20',
            'mobile' => 'required|string|size:11|regex:' . __('com.mobileReg'),
            'provinceId' => 'required|integer|max:31',
            'cityId' => 'required_with:provinceId|integer|max:373',
            'districtId' => 'required_with:cityId|integer|max:3711',
            'address' => 'required_with:districtId|string|max:50',
            'isDefault' => 'nullable|boolean'
        ];
    }
}
